/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Views.GestionRestaurateur;

import java.io.File;
import javax.swing.filechooser.FileFilter;

/**
 *
 * @author ibrahim
 */
public class RestaurateurFileFilter extends FileFilter{

    @Override
    public boolean accept(File f) {
        String fileName = f.getName();
        String extension = Utils.getFileExtension(fileName);
        if (f.isDirectory()){
            return true;
        }
        if (extension == null){
            return false;
        }
        if (extension.equals("res")){
            return true;
        }
        return false;
    }

    @Override
    public String getDescription() {
        String extrensionDescription = "Restaurateur database files (*.res)";
        return extrensionDescription;
    }
    
}
